<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/21
 * Time: 11:07
 */

namespace app\admin\model;

use think\Model;

class RoleOperators extends Model
{
    /**
     * @todo 通过管理员id获取角色集合ids
     * @param $operator_id 管理员id
     * @return array
     */
    public function getRolesByOperatorId($operator_id)
    {
        $list = $this->where('operator_id', $operator_id)->column('role_id');
        return array_unique($list);
    }

}